package com.bytech.common.config;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * 图床 API 接口配置类
 *
 * @Author Zhao
 * @Create 2021/8/17 23:04
 */
@Getter
@Configuration
public class GalleryApiConfig {

    @Value("${gallery.api.token}")
    private String token;

    @Value("${gallery.api.token.key}")
    private String tokenKey;

    @Value("${gallery.api.domain}")
    private String domain;

    public static final String GALLERY_RANDOM_PICTURES_URL = "/api/picture/randomPictures"; // 图床随机图片接口地址
    public static final String GALLERY_UPLOAD_PICTURES_URL = "/api/picture/upload"; // 图床上传图片接口地址

    public static final String GALLERY_ARTICLE_IMAGE_UPLOAD_PATH = "/blog/image/article"; // 图床API接口上传的文章图片保存路径
    public static final String GALLERY_EMOTICON_IMAGE_UPLOAD_PATH = "/blog/image/emoticon"; // 图床API接口上传的表情包图片保存路径

    public String getGalleryApiUrl(String apiUrl) {
        return domain + apiUrl;
    }


}
